import React, { Component } from 'react'
import Home from "./components/Home/home"
import Address from "./components/Address/address"
import Sort from "./components/Sort/sort"
import My from "./components/My/my"
import Login from "./components/Login/login"
import About from "./components/About/about"
import{HashRouter as Router,Redirect,Route,Switch} from "react-router-dom"
import Tabber from "./components/tabber/tabber"

export default class App extends Component {
  render() {
    return (
      <div>
        <Router>
          <Switch>
            <Route exact path="/home" render={(props) =><Tabber {...props}><Home></Home></Tabber>}></Route>
            <Route exact path="/sort" render={(props) =><Tabber {...props}><Sort></Sort></Tabber>}></Route>
            <Route exact path="/address" render={(props) =><Tabber {...props}><Address></Address></Tabber>}></Route>
            <Route exact path="/my" render={(props) =><Tabber {...props}><My></My></Tabber>}></Route>
            <Route exact path="/login" render={(props) =><Tabber {...props}><Login></Login></Tabber>}></Route>
            <Route exact path="/about" render={(props) =><About{...props}></About>}></Route>

            <Redirect to="/home"></Redirect>
          </Switch>
        </Router>
      </div>
    )
  }
}
